package com.android.Hello;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class HelloActivity extends Activity
{
	OnClickListener listener0 = null;
	OnClickListener listener1 = null;
	OnClickListener listener2 = null;
	OnClickListener listener3 = null;
	OnClickListener listener4 = null;

	Button btn0;
	Button btn1;
	Button btn2;
	Button btn3;
	Button btn4;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);

		listener0 = new OnClickListener()
		{

			@Override
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				Intent intent0 = new Intent(HelloActivity.this,
						ActivityFrameLayout.class);
				setTitle("FrameLayout");
				startActivity(intent0);
			}
		};

		listener1 = new OnClickListener()
		{

			@Override
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				Intent intent1 = new Intent(HelloActivity.this,
						ActivityRelativeLayout.class);
				startActivity(intent1);
			}
		};

		listener2 = new OnClickListener()
		{

			@Override
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				Intent intent2 = new Intent(HelloActivity.this,
						ActivityLayout.class);
				startActivity(intent2);
			}
		};

		listener3 = new OnClickListener()
		{

			@Override
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				Intent intent3 = new Intent(HelloActivity.this,
						ActivityTableLayout.class);
				startActivity(intent3);
			}
		};

		listener4 = new OnClickListener()
		{

			@Override
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				Intent intent4 = new Intent(HelloActivity.this,
						ActivityWidget.class);
				startActivity(intent4);
			}
		};
		setContentView(R.layout.main);
		btn0 = (Button) findViewById(R.id.button1);
		btn0.setOnClickListener(listener0);

		btn1 = (Button) findViewById(R.id.button2);
		btn1.setOnClickListener(listener1);

		btn2 = (Button) findViewById(R.id.button3);
		btn2.setOnClickListener(listener2);

		btn3 = (Button) findViewById(R.id.button4);
		btn3.setOnClickListener(listener3);

		btn4 = (Button) findViewById(R.id.button5);
		btn4.setOnClickListener(listener4);
		
		Button btn5 = (Button)findViewById(R.id.button6);
		btn5.setOnClickListener(new OnClickListener()
		{
			
			@Override
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				Intent intent5 = new Intent(HelloActivity.this,ActivityImageswicher.class);
				startActivity(intent5);
			}
		});
		
		Button btn6 = (Button)findViewById(R.id.button7);
		btn6 .setOnClickListener(new OnClickListener()
		{
			
			@Override
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				Intent intent7 = new Intent(HelloActivity.this,ActivityGridView.class);
				startActivity(intent7);
			}
		});
		
		Button btn7 = (Button)findViewById(R.id.button8);
		btn7 .setOnClickListener(new OnClickListener()
		{
			
			@Override
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				Intent intent8 = new Intent(HelloActivity.this,ActivityTab.class);
				startActivity(intent8);
			}
		});
	}
}